<!DOCTYPE html>
<html>
<head>
<title><?php echo C("SITE_NAME");?> -皇冠后台登录</title>
<meta name="description" content=""> 
<link type="text/css" rel="stylesheet" href="__STATIC__admin/css/login.css"/>
<include file="Common:layer" />
<style>
.headLogo {float: left;;padding-top:28px;}
.headLogo a {
  display: block;
  float: left;
  padding: 0 15px 0 0;
}




</style>
</head>
<body>

<div class="pcLogin">

	<div class="header">
		<div class="wrap1000 clear">
			<h1 class="headLogo clear">
				<a href="/king/"><img src="<?php echo C('UPYUN_DOMAIN');?><?php echo C('SITE_TOPLOGO1');?>" style="max-height:60px;"></a>
				 <p class="headLogoTitle">大皇冠后台</p>
			</h1>
		</div>
	</div>
	
	
	
	<div class="contentWrap clear">
		<div class="contentLeft">
			<img src="<?php echo C('UPYUN_DOMAIN');?><?php echo C('SITE_LOGINADS');?>" width="496" height="273"> 
		</div>
		<div class="contentRight">
			<div class="contentLoginRc">
				<form id="form" name="formname" action="/king/login/dologin" method="post" onsubmit="return false;">
					<h2>大皇冠登录</h2>
						<div class="loginAlert">
						</div>
						<div class="loginUser">
							<input id="username" name="username" class="login_input1 logintext text"  type="text" placeholder="请输入用户ID" value="" size="14" autocomplete="off"/>
						</div>
						<div class="loginUser">
							<input id="password" name="password" class="login_input2 logintext text"  placeholder="密码" type="password" value="" size="14" autocomplete="off"/> 
						</div>
						<div class="loginUser1">
							<input name="rememberme" type="checkbox" class="login_input3" id="rememberme"/>
							<span><label for="login" id="remembermetext">记住用户ID</label></span>
							<span class="forget"><a href="javascript:void(0);">如不知道账号密码,请联系客户</a></span>
						</div>
						<input id="submitbtn"  class="loginsubmit" value="登 录" type="submit" />
						<!--<p><a href="javascript:void(0);">免费注册</a></p>-->
				</form>
				</div>
			</div>
		</div>
	
	
	<div class="contentWrap clear"  style="display:none;">
		<div class="contentLeft">
			<img src="<?php echo C('UPYUN_DOMAIN');?><?php echo C('SITE_LOGINADS');?>" width="496" height="273"> 
		</div>
		<div class="contentRight">
			<img width='100%' src="<?=$qrurl?>"/><br>
			<div style="text-align:center;font-size:20px" id="alert">请使用微信扫码登录</div>
			</div>
		</div>
		

<div class="footer" style="text-align:center;">
    <div class="footerAd wrap1000">
		&copy; <?php echo date('Y');?> <?php echo C("SITE_NAME");?> 版权所有  <?php echo C("SITE_ICP");?>
		<p><?php echo C("SITE_COMPANY");?> 客服电话：<?php echo C("SITE_TEL");?>  <?php echo C("SITE_ADDRESS");?></p>
		<p><?php echo C("POWER_BY");?></p>
    </div>
</div>



</div>

<script>
$('#submitbtn').on('click', function(){
   AjaxFormSubmit();
});


randid = '<?=$randid?>';
//微信扫码登录处理逻辑
$(function(){
	login();
	function login(){
		$.get('/King/login/autoLogin?randid='+randid,
				function(data,status){
					if(data == 0){
						setTimeout(function(){
							login();
						},5000);
					}
					else if(data == 1){
						window.location.href = '/King/index/index';
					}else if(data == 2){
						//长时间未登录，该登录过期
						$('#alert').text('二维码已过期，请刷新页面')
					}
				});
	}
	
})
</script>


</body>
</html>